home *** CD-ROM | disk | FTP | other *** search
/ Die Ultimative Software-P…i Collection 1996 & 1997 / Die Ultimative Software-Pakete CD-ROM fur Atari Collection 1996 & 1997.iso / i / internet / software / dlinksr / pktqueue.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-04-01  |  920 b   |  36 lines

  1. /********************************************************************/
  2. /*                                                                    */
  3. /*    Packet driver for D-LINK DE600 ethernet controller                */
  4. /*                                                                    */
  5. /*    Copyleft by P. Mayer, 1993 TU-Vienna IAEE                        */
  6. /*    All rights reserved                                                */
  7. /*                                                                    */
  8. /********************************************************************/
  9.  
  10. /* queue definitions */
  11.  
  12. #ifndef _PKT_QUEUE
  13. #define _PKT_QUEUE
  14.  
  15.  
  16. typedef struct
  17. {
  18.     int        p_get;
  19.     int        p_put;
  20.     int        p_nbuf;
  21.     struct    p_table
  22.     {
  23.         int        p_occupied;
  24.         PKTBUF    *p_pkt;
  25.     }p_tab[MAXPKT];
  26. } PKTPOOL;
  27.  
  28.  
  29. PKTBUF *p_getpkt(u_short,PKTPOOL *);            /* dequeue packet */
  30. int p_putpkt(PKTPOOL *,PKTBUF *);                /* enqueue packet */
  31. PKTBUF *ap_getpkt(u_short,PKTPOOL *);            /* dequeue packet atomic */
  32. int ap_putpkt(PKTPOOL *,PKTBUF *);                /* enqueue packet atomic */
  33. PKTPOOL *p_init(int,PKTPOOL *,PKTBUF *);        /* init queue */
  34.  
  35. #endif
  36.